package com.example.datajpatable.repository;


import com.example.datajpatable.domain.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Map;

public interface StudentRepository extends JpaRepository<Student,Integer> {

//    @Query(value = "select *from tb_student",nativeQuery = true)
//    public List<Map<String,Object>> QueryPageUsers;


//    List<Student> list = countryMapper.selectByPageNumSize();
    /**
     * 根据学生名字进行查询，所有信息
     * @param pName
     * @return
     */
//    List<Student> Mocha(String pName);
    /**
     * 按名字查询
     * @param name
     * @return
     */
    List<Student> findBySnameLike(String name);
    /**
     * 按名字和学号进行查询
     */
    List<Student> findBySnameAndSno(String name,String sno);
    List<Student> findBySnameAndPassword(String name,String password);
}